<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>

</h:head>
<h:body>
	<f:metadata>
		<f:event type="preRenderView" listener="#{showPacPers.preloadData()}" />
	</f:metadata>

	<h:outputLabel>Pacchetto ID: #{showPacPers.pacchetto.getIDPacchetto}</h:outputLabel><br/>
	<h:outputLabel>Hotels</h:outputLabel>
	<h:dataTable value="#{showPacPers.pacchetto.getHotels()}" var="hotel" id="hotels">
		<p:column headerText="Nome">
			<h:outputText value="#{hotel.getHotel().getNome()}" />
		</p:column>
		
		<p:column headerText="Check In">
			<h:outputText value="#{hotel.getCheckIN()}" />
		</p:column>
		
		<p:column headerText="Check Out">
			<h:outputText value="#{hotel.getCheckOUT()}" />
		</p:column>
		
		<p:column headerText="Numero Persone">
			<h:outputText value="#{hotel.getNumeroPersone()}" />
		</p:column>
	</h:dataTable><br/>
	
	<h:outputLabel>Voli</h:outputLabel>
	<h:dataTable value="#{showPacPers.pacchetto.getVoli()}" var="volo" id="voli">
		<p:column headerText="Data">
			<h:outputText value="#{volo.getData()}" />
		</p:column>
		
		<p:column headerText="Partenza">
			<h:outputText value="#{volo.getTrattaVolo().getDaAeroporto().getName()}" />
		</p:column>
		
		<p:column headerText="Arrivo">
			<h:outputText value="#{volo.getTrattaVolo().getaAeroporto().getName()}" />
		</p:column>
		
		<p:column headerText="Numero Persone">
			<h:outputText value="#{volo.getNumeroPersone()}" />
		</p:column>
	</h:dataTable><br/>
	
	<h:outputLabel>Tour</h:outputLabel>
	<h:dataTable value="#{showPacPers.pacchetto.getTours()}" var="tour" id="tours">
	<p:column headerText="Data">
			<h:outputText value="#{tour.getData()}" />
		</p:column>
		
		<p:column headerText="Descrizione">
			<h:outputText value="#{tour.getTour().getDescrizione()}" />
		</p:column>
		
		<p:column headerText="Numero Persone">
			<h:outputText value="#{tour.getNumeroPersone()}" />
		</p:column>
	</h:dataTable>
</h:body>
</html>